#include "VDisk.h"

const int IDLE_TIME_TO_STANDVY = 20;
const int DISK_CAPACITY = 1000;

VDisk::VDisk(void)
{
	power_save = 0;
	power_comsumption = 0;
	m_mode = 0; 
	m_idle_time = 0;
}


VDisk::~VDisk(void)
{
}

void VDisk::update(){
	if(m_idle_time >= IDLE_TIME_TO_STANDVY)
	{
		m_mode = 0;
	}
	else
		m_mode = 1;

	if(m_mode == 1)
		power_comsumption++;
	else
		power_save++;

	m_idle_time++;
}

void VDisk::access(){
	m_idle_time = 0;
}